<!DOCTYPE html>
<!-- 网页使用的语言 -->
<html lang="zh-CN">
    <head>
    	<base href="<%=basePath%>"/>
        <!-- 指定字符集 -->
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>修改图书</title>

        <link href="/static/css/bootstrap.min.css" rel="stylesheet">
        <script src="/static/js/jquery-2.1.0.min.js"></script>
        <script src="/static/js/bootstrap.min.js"></script>
        
    </head>
    <body>
        <div class="container" style="width: 400px;">
        <h3 style="text-align: center;">修改图书</h3>
        <form action="/bookupdate/" method="post" enctype="multipart/form-data">


                <input type="hidden" class="form-control" id="id" name="id" value="{{ book.id }}" readonly placeholder="id" />

                <div class="form-group">
                    <label for="bookname">图书名称：</label>
                    <input type="text" class="form-control" value="{{ book.bookname }}" id="bookname" name="bookname" placeholder="请输入图书名称">
                </div>

                <div class="form-group">
                    <label for="bookprice">图书价格：</label>
                    <input type="number" class="form-control" value="{{ book.bookprice }}" id="bookprice" name="bookprice" placeholder="请输入价格"/>
                </div>

                 <div class="form-group">
                    <label for="bookauther">图书作者：</label>
                    <input type="text" class="form-control" value="{{ book.bookauther }}" id="bookauther" name="bookauther" placeholder="请输入图书作者"/>
                </div>

                <div class="form-group">
                    <label for="bookimg">图书图片：</label>
                    <input type="file" class="form-control" value="{{ book.bookimg }}" id="bookimg" name="bookimg"/>
                    <img src="{{ book.bookimg }}" width="100px" height="100px">
                    <input type="hidden" name="bookimgname" value="{{ book.bookimg }}">
                </div>

                <div class="form-group">
                    <label for="press_id">出版社：</label>
                    <select name="press_id" class="form-control" id="press_id">
                        {% for press in  presslist %}
                            {% if press.pressname == book.press.pressname %}
                                <option selected="selected" value="{{ press.id }}">{{ press.pressname }}</option>
                            {% else %}
                                <option value="{{ press.id }}">{{ press.pressname }}</option>
                            {% endif %}

                        {% endfor %}
                    </select>
                </div>
                <div class="form-group" style="text-align: center">
                    <input  class="btn btn-primary" type="submit" value="提交" />
                    <input class="btn btn-default" type="reset" value="重置" />
                    <input class="btn btn-default" type="button" onclick="history.back()" value="返回"/>
                </div>
        </form>
        </div>
    </body>
</html>